package cn.tedu.review;
/**本类用于复写多线程编程方案1*/
public class Demo {
    public static void main(String[] args) {
        MyThread t1 = new MyThread();
        MyThread t2 = new MyThread();
        MyThread t3 = new MyThread();
        MyThread t4 = new MyThread();
        t1.run();
        t4.run();
        t2.run();
        t3.run();

    }

}

//1.自定义一个多线程类，继承Thread类
class MyThread extends Thread{
    //2.重写父类的run()

    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            //3.完成自己的业务
            System.out.println(i+"="+getName());
        }
    }
}
